package org.example.coffeeshoporderingsystem.staff.util;

import org.example.coffeeshoporderingsystem.staff.entity.Staff;

public class StaffUtil {
    private static ThreadLocal<Staff> staffThreadLocal = new ThreadLocal<>();

    public static void setStaff(Staff staff) {
        staffThreadLocal.set(staff);
    }

    public static Staff getStaff() {
        return staffThreadLocal.get();
    }

    public static void clearStaff() {
        staffThreadLocal.remove();
    }
}
